from flask import Flask, render_template
from FAMS.views import init_views
import setting


def create_app():
    app = Flask(__name__)

    app.config.from_object(setting)
    app.debug = setting.DEBUG

    init_views(app)

    @app.route('/')
    def index():
        return render_template('index.html')

    return app
